import * as sqlite_opt from "@/utils/sqliteUtil.js";

const ballTableName = "t_thck_bln";

export const requireMarkupBallData = (inDmgCode) => {
	return new Promise((resolve, reject) => {
		let sqlStr = `SELECT `;
		sqlStr += `
			*
		`
		sqlStr += `from ` + ballTableName;
		sqlStr += ` where `;
		sqlStr += "   1 = 1 "
		sqlStr += inDmgCode ? (` AND dmg_code = ` + inDmgCode) : " ";
		sqlStr += `  ORDER BY pos_no`

		sqlite_opt.selectSql(sqlStr,
			(e) => {
				resolve(e);
			},
			(e) => {
				reject(e);
			});
	})
}